/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author Cheng
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '/@/api/model/baseModel';

const { adminPath } = useGlobSetting();

export interface UnitFloor extends BasicModel<UnitFloor> {
  floorNum?: number; // 楼层数
  picPath?: string; // 图片url
  enterpriseId?: number; // 企业id
  buildingId?: number; // 建筑id
  addTime?: string; // 添加时间
  updateTime?: string; // 更新时间
  deleted?: string; // 逻辑删除
}

export const unitFloorList = (params?: UnitFloor | any) =>
  defHttp.get<UnitFloor>({ url: adminPath + '/unitmanage/unitFloor/list', params });

export const unitFloorListData = (params?: UnitFloor | any) =>
  defHttp.post<Page<UnitFloor>>({ url: adminPath + '/unitmanage/unitFloor/listData', params });

export const unitFloorForm = (params?: UnitFloor | any) =>
  defHttp.get<UnitFloor>({ url: adminPath + '/unitmanage/unitFloor/form', params });

export const unitFloorSave = (params?: any, data?: UnitFloor | any) =>
  defHttp.postJson<UnitFloor>({ url: adminPath + '/unitmanage/unitFloor/save', params, data });

export const unitFloorDelete = (params?: UnitFloor | any) =>
  defHttp.get<UnitFloor>({ url: adminPath + '/unitmanage/unitFloor/delete', params });
